docs: bracket positional dir metavar in _tools/lint/pkg-json and _tools/lint/repl-txt usage strings#13372
docs: bracket positional dir metavar in _tools/lint/pkg-json and _tools/lint/repl-txt usage strings#13372Planeshifter wants to merge 4 commits into
dir metavar in _tools/lint/pkg-json and _tools/lint/repl-txt usage strings#13372Conversation
…ge strings
Aligns `pkg-json/docs/usage.txt` and `pkg-json/README.md` with the
`_tools/lint` namespace convention:
- Wraps the positional `dir` metavar in angle brackets (`[<dir>]`)
in the CLI Usage line — 7 of 9 sibling packages use the
angle-bracketed form.
- Drops the trailing blank line at EOF of `docs/usage.txt` — 7 of 9
siblings terminate the file with a single newline.
The `bin/cli` reads `docs/usage.txt` verbatim as its `--help` output,
and `test/test.cli.js` compares stderr against the file contents
symmetrically, so no test expectations change.
…ge strings
Aligns `repl-txt/docs/usage.txt` and `repl-txt/README.md` with the
`_tools/lint` namespace convention:
- Wraps the positional `dir` metavar in angle brackets (`[<dir>]`)
in the CLI Usage line — 7 of 9 sibling packages use the
angle-bracketed form.
- Drops the trailing blank line at EOF of `docs/usage.txt` — 7 of 9
siblings terminate the file with a single newline.
The `bin/cli` reads `docs/usage.txt` verbatim as its `--help` output,
and `test/test.cli.js` compares stderr against the file contents
symmetrically, so no test expectations change.
…ings Reduces the leading indent on `--option` lines in `docs/usage.txt` and the mirrored `text` code block in `README.md` from 9 spaces to 8 spaces (matching sibling `_tools/lint/pkg-json-names` and the `[usage.txt] indent_size = 2` rule in the root `.editorconfig`). The `-h,`/`-V,` short-option rows are shortened by one intra-line space so `--help` and `--version` continue to align vertically with `--pattern` and friends. Pre-existing lint debt surfaced only after this PR touched the two files; no CLI behavior changes.
…ings Reduces the leading indent on `--option` lines in `docs/usage.txt` and the mirrored `text` code block in `README.md` from 9 spaces to 8 spaces (matching sibling `_tools/lint/pkg-json-names` and the `[usage.txt] indent_size = 2` rule in the root `.editorconfig`). The `-h,`/`-V,` short-option rows are shortened by one intra-line space so `--help` and `--version` continue to align vertically with `--pattern` and friends. Pre-existing lint debt surfaced only after this PR touched the two files; no CLI behavior changes.
|
CI status after the follow-up indent-normalization push (
My working hypothesis is that this is pre-existing infrastructure noise on Options:
Happy to take any of the three. Local drift report and per-feature majority breakdown are at Generated by Claude Code |
Description
This pull request:
docs/usage.txt/README.mdoutliers in@stdlib/_tools/lint/*with the namespace's documented-CLI conventions. No observable CLI behavior changes — thebin/cliprintsdocs/usage.txtverbatim as--help, andtest/test.cli.jsreads the same file for its expected value, so both sides of the equality shift together.pkg-json-namesand the[usage.txt] indent_size = 2rule in the root.editorconfig). This is pre-existing lint debt that surfaced only after the PR touched the files.Namespace summary
@stdlib/_tools/lint(9 non-autogenerated members:filenames,header-filenames,license-header,license-header-file-list,license-header-glob,namespace-aliases,pkg-json,pkg-json-names,repl-txt).package.jsonshape, README section list + order,docs/usage.txtfirst/last byte andUsage:line shape,etc/cli_opts.jsonshape,manifest.jsonpresence,test//benchmark//examples/filename sets, plus the semantic pass overlib/index.js/lib/main.js/lib/async.js/lib/sync.js/lib/validate.js/lib/lint.js(signature, return kind, validation prologue, error construction, JSDoc shape,@stdlib/*dependencies).package.jsontop-level key set,directories/engines/license/bugs/homepage/repositoryshape,etc/cli_opts.jsonboolean/aliasblock,docs/usage.txtleading newline,docs/usage.txttrailing single newline, angle-bracketed positional metavars inUsage:,format-based thrown-error construction, callback-parameter validation viaisFunction,hasExample: trueon the primary export.package.jsonosfield (2/9 split — behavior-affecting; already flagged and excluded by PR chore: align outliers in_tools/lintwith namespace majority patterns #11835), presence/shape oflib/main.jsvslib/async.js+lib/sync.js(reflects real generation-of-API split acrosslicense-header*vs the rest), README<section class="notes">content (empty sections inpkg-jsonandrepl-txtneed authored content, not mechanical alignment),returnsTagandthrowsTagssets on the primary JSDoc (heterogeneous — no ≥7/9 pattern).@stdlib/_tools/lint/pkg-jsonBracketed the positional metavar in the
Usage:line ofdocs/usage.txtandREADME.md([dir]→[<dir>]) to match the 78% of_tools/lintsiblings that use angle-bracket metavars, and trimmed the trailing blank line fromdocs/usage.txtso--helpoutput no longer emits a spurious empty line. Follow-up commit reduces the--optionindent from 9 to 8 spaces (multiple of 2, per.editorconfig) and drops one space from the-h,/-V,rows so the columns still align — the odd indent tripped theLint Changed Fileseditorconfig check as soon as the file entered the PR diff.bin/cliprintsdocs/usage.txtverbatim andtest/test.cli.jscompares against the same file, so test expectations are unchanged.@stdlib/_tools/lint/repl-txtBracketed the positional metavar in the
Usage:line ofdocs/usage.txtandREADME.mdto[<dir>], matching 7 of 9 sibling packages in_tools/lint(~78%). Trimmed the trailing blank line fromdocs/usage.txtso the file ends with a single\n, since the extra newline propagated verbatim intobin/cli--helpoutput. Follow-up commit applies the same indent normalization (9 → 8 spaces on--optionlines) aspkg-jsonfor the same editorconfig reason. No test expectation changes:test/test.cli.jsreadsdocs/usage.txtsymmetrically.Validation
Checked:
package.jsonkeys, README section list,docs/usage.txtfirst/last-byte shape, andUsage:line format across all 9 namespace members.lib/index.js/lib/main.js/lib/async.js/lib/sync.js/lib/validate.js(public signature, validation prologue, error construction, JSDoc shape,@stdlib/*dependencies).confirmed-driftfor bothpkg-jsonandrepl-txton both the bracket-metavar and trailing-newline corrections. Cross-reference verified thattest.cli.jsin both packages readsdocs/usage.txtat runtime for its expected value and compares symmetrically tostderr, so no test expectation is pinned to the pre-fix bytes; no example loads the usage text._tools/lintwith namespace majority patterns #11835 (2026-04-29) and refactor: normalize error messages and descriptions #12214 (2026-05-20), which touched this namespace previously. Neither addressed theUsage:metavar bracketing nor thedocs/usage.txttrailing-newline shape.Deliberately excluded:
namespace-aliasesmissingtest/test.sync.js— reraised as a candidate, but PR chore: align outliers in_tools/lintwith namespace majority patterns #11835 already surfaced and rejected this with the reason "a meaningful test would require fixtures the package lacks". Not reopened.package.jsonosfield divergence — 2/9 vs 7/9, behavior-affecting on publish, unclear intent (already excluded by chore: align outliers in_tools/lintwith namespace majority patterns #11835).pkg-jsonandrepl-txtempty<section class="notes">blocks in Usage sections — requires authored content, not mechanical alignment.lib/main.jsvslib/async.js+lib/sync.jssplit — reflects the olderlicense-header*API shape vs the newer async/sync split; changing it is a rewrite, not drift correction.license-headerreturnKind/publicSignaturedeviation — intentional (synchronous string-blob primitive).license-header-file-listpublicSignaturedeviation — intentional (positional file-list is the API contract).header-filenames/docs/usage.txt— same 9-space indent, but the file isn't touched by this PR, so it stays out ofLint Changed Files. Log-and-skip; separate maintenance PR appropriate.Related Issues
No.
Questions
No.
Other
Each package gets two commits (one for the drift correction, one for the indent normalization) so the audit trail stays per-package and per-concern. Conformance percentages for each drift item are quoted in the respective commit body. Total diff is 4 files, 28 insertions and 30 deletions.
Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was produced by an automated cross-package API drift sweep run by Claude Code against the
@stdlib/_tools/lintnamespace. Structural and semantic features were extracted per package, majorities were computed at the 75% threshold, and each surviving candidate was validated by three independent review passes (semantic, cross-reference, structural) before any file was modified. The follow-up indent-normalization commits were added afterLint Changed Filessurfaced a pre-existing editorconfig violation on the two files the PR already touched. All edits are mechanical whitespace or text substitutions in two packages; no behavior, signatures, or test expectations changed.@stdlib-js/reviewers